home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
usenet
/
sources
/
volume90
/
util
/
gdostool
/
part01
/
gdostool.doc
next >
Wrap
Text File
|
1990-10-14
|
1KB
|
31 lines
GdosTool - By J Davis 08/1990
Why
---
An easy mistake to make when progrmming in assembler is to accidentally
use $0 (the value in memory location $0) where you mean #$0 (the constant
value zero). A subtle mistake - one not aided by the fact that memory
loaction 0 often holds 0, so it will yield the right results.
The first you notice of this problem is when your code is run on some a590
equipped 500's , or 2000s with 2091 controllers, where $0 may actually
hold the string 'GDOS'. The same situation can also occur in most high
level languages, by de-referencing a NIL pointer.
The result can be anything from small errors upto a full blown GURU (if
the code tries to de-ref $0 as a pointer to a word - it will yield a
non-word aligned word access)
This is a common problem (other programs that have trouble with a non zero
location 0 are virusx4, lharc1.20, execellence 1.11, Jrcomm 1.0 and
several others).
By using this tool you can set location zero to a 'problem' value before
testing your code - this will hopefully make the release of programs with
such 'mistakes' less common.
You can also set it back to $0000000 - useful after you've finished
testing, and also potentially useful for people with a590s or 2091s.